﻿<UserControl
    x:Class="IGL_Talk_Win8.Controls.Messages"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:IGL_Talk_Win8.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*" />
            <RowDefinition Height="60" />
        </Grid.RowDefinitions>
        <ListView x:Name="listMessages"
                  Grid.Row="0" 
                  SelectionMode="None"
                  Margin="20,0,0,0">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <StackPanel>
                        <TextBlock Text="{Binding Date}" 
                                   Margin="0,0,0,10"
                                   Foreground="#ededed" 
                                   FontFamily="Calibri" 
                                   HorizontalAlignment="Right" />
                        <Border Background="#ededed">
                            <StackPanel>
                                <TextBlock Text="{Binding User.Name}"
                                       FontSize="20"
                                       Margin="20,10,0,10"
                                       FontWeight="Bold"
                                       FontFamily="Calibri"
                                       Foreground="#2f2f2f" />
                                <TextBlock Text="{Binding Text}"
                                       FontSize="15"
                                       Margin="20,0,20,10"
                                       FontFamily="Calibri Light"
                                       TextWrapping="WrapWholeWords"
                                       Foreground="#2f2f2f" />
                            </StackPanel>
                        </Border>
                    </StackPanel>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <Grid Grid.Row="1">
            <TextBox x:Name="txtMessage"
                     x:Uid="MessageBox" 
                     FontSize="18" 
                     HorizontalAlignment="Stretch"
                     KeyDown="txtMessage_KeyDown"
                     KeyUp="txtMessage_KeyUp" 
                     Margin="12"
                     Background="Transparent"
                     BorderBrush="#e0dfdf" 
                     Foreground="#e0dfdf" />
            <!--<Button x:Name="cmdSend"
                    x:Uid="SendButton"
                    Content="Send"
                    Grid.Column="1"
                    HorizontalAlignment="Center"
                    Click="cmdSend_Click"
                    Margin="12"
                    Foreground="Black" />-->
        </Grid>
    </Grid>
</UserControl>